home *** CD-ROM | disk | FTP | other *** search
- Path: news.mindlink.net!news
- From: brent_bysouth@mindlink.bc.ca (Brent Bysouth)
- Newsgroups: comp.lang.c++,comp.lang.pascal.delphi.misc
- Subject: Re: C++ with Zapp vs. Delphi
- Date: Mon, 15 Jan 1996 13:10:14 GMT
- Organization: MIND LINK! - British Columbia, Canada
- Message-ID: <4ddke3$5lf@fountain.mindlink.net>
- References: <4coar6$d4n@sun4.bham.ac.uk> <4coip7$69s@news1.usa.pipeline.com> <fRA+w0JfFG5X089yn@oslonett.no> <4dcc4d$6anc@tigger.cc.uic.edu>
- NNTP-Posting-Host: line005.nwm.mindlink.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- olczyk@sunphy1 (Thadeus Olczyk) wrote:
-
- Oh well, I'm probably falling for the bait here...
-
- >Rune Moberg (mobergru@oslonett.no) wrote:
- >: Yes, comparing VC++ to Delphi is indeed possible. I'm not sure of VC++'s
- >: code optimizations, but generally Delphi would loose out to a C++ compiler,
- >: because C++ compilers tend to make more use of registers and optimizes
- >: loops better. This will change in Delphi 2.0, where Delphi shares compiler
- >: backend with BC++ 5.0.
-
- >As long as Delphi supports the toxic combination static typing and
- >single inheritance , people will not be able to use polymorphism
- >to replace case statements which will always make Delphi slower in any
- >large application.
-
- You don't seem to understand the significance of RTTI in Delphi. You
- can execute methods and set/get properties by name lookup -- ie.
- dynamic method resolution similar to what's in ObjectiveC & Smalltalk.
- Delphi's VCL makes extensive use of this when components are streamed
- in from form files. Also, through the use of virtual constructors and
- class references (ie. metaclasses), you can write generic code that
- constructs objects of unknown subtypes. I've personally used these
- things to implement a pseudo-late binding class "factory" that you can
- load from DLLs.
-
- Because of these things, case statements certainly aren't the norm in
- Delphi programming.
-
- >: Now, let's compare RAD, ease of maintenance and readable code. Categories
- >: where Delphi has a head start...
-
- >Let's. RAD has recently come into disfavor in publications like JOOP, Object,
- >and even Byte. Last summer InfoWorld reported a growing disillusionment
- >of MIS departments with RAD tools. It seems that when RAD is introduced
- >the parts of a project that got finished before RAD was introduced got finished
- >faster, but that projects as a whole showed the same cost and failure rate
- >before and after.
-
- Given many of Delphi's RAD competitors, I can see why RAD has a bad
- name. Delphi is popular because it is a 'second-generation' RAD tool,
- and eliminates many of the problems of first generation RAD tools.
-
- >I would like to see how you justify a claim of ease of mainenance when Delphi
- >does not support MI. Implication-- under some circumstances one cannot abstract
- >out common behavior and therefor must cut and paste code-- ie-- they must copy bugs.
- >Everyone I know agrees that that causes a maintenace nightmare.
-
- Yes, I agree that cutting & pasting code brings on maintenance
- nightmare. I'm less sure that a lack of MI does though, as would many
- others. MI vs. SI is an age old argument, and you're not going to get
- a concensus on it anytime soon. If you really want a discussion on
- it, start a thread in comp.object!
-
- [...]
-
- >: >Maybe C vs. Pascal , but C++ is OO and Object Pascal is a fraud perpetuated by
- >: >Borland on the world.
-
- Would you care to elaborate on this one? If you're attempting to say
- that C++ is more OO than Object Pascal, could you back this up?
-
- >No MI isn't required for OO. Smalltalk does well without it, but then
- >again Smalltalk is dynamically typed. For a statically typed language
- >MI is almost essential. You do know that Delphi is a statically typed
- >language? Didn't you read the part of my post where I noted this? You
- >can read can't you?
-
- Refer to my previous statement concerning RTTI.
-
- >If MI is not so great why does Borland simulate it in the VCL? Did you notice
- >that I pointed this out? You can read can't you?
-
- I think all of us noticed you saying that. Please support it though --
- give examples of where Borland simulated MI in the VCL. However,
- don't confuse MI with delegation (which at least Object Pascal and
- Objective C support and encourage) and association (do any mainstream
- languages support this as a language feature?).
-
-
- >: I'd go so far to claim that Object Pascal is more OO than C++. Hey, Delphi
- >: has even got properties, far more useful than any missing C++ feature!
-
- >I notice that you didn't answer a charge I made about Delphi.
- >Since when is language where the following happens:
-
- >a method that is declared as generally accessible is not accessible
- >under many circustances without violating a fundamental rule of
- >OO or do severe workaround,
-
- >considered an OO language.
-
- >You did read the part where I mentioned this? You can read can't you?
-
- Again, I think everybody read this. What exactly are you talking
- about? Public methods are public. Published methods are published.
- Are you commenting on unit level access to protected and private
- variables (ever heard of friends in C++?) ? Please clarify...
-
- >Add to the other weaknesses of Delphi the fact that you can instantiate
- >abstract classes. How good is a language which allows you to make a
- >contract and then break it.
-
- I've often wondered myself why you can instantiate abstract classes.
- However, if you're coming from a C++ background, I think it's a bit
- hypocritical to make the second statement that you did. Why not talk
- about C++'s problems wrt its VMT? Ie.
-
- - C++ objects are not binary compatible across compiler
- implementations
-
- - changes in C++ objects that affect the VMT mean that code accessing
- that object must be recompiled (can this be classified as a
- "maintenance nightmare"?). This is probably C++ worst problem -- it
- gets to the point where DLLs compiled from C are more reliable and
- reusable than those from C++.
-
- BTW, Delphi has a VMT but also supports a dynamic method table that
- gets around this problem (ie: methods declared with the dynamic and
- message directives).
-
- >As for properties I would like to see a justification for why properties
- >are so great. They are not a bad thing, but I don't see where they are
- >so great as to be considered a critical feature of a language.
- >I would like to see some argement for why properties are considered a better
- >feature then a set of conainer classes.
-
- I classify properties as a nice-to-have (but non-essential) feature.
- I classify MI as the same -- Object Pascal & Smalltalk surely seem to
- get by alright without them. (Or at least you haven't proven
- otherwise).
-
- And yes, if you want container classes, you can construct them using
- Delphi's RTTI and class objects. They wouldn't be a compiler-known
- entity (ie. they wouldn't have full static typechecking), but you
- certainly can do them.
-
- ---
-
- Alas, after having said all this, I'm not sure that you're interested
- more in discussion or in flaming. Your response to Rune seems to
- indicate the latter.
-
-
- --------------------------------------------------
- brent_bysouth@mindlink.bc.ca
- VB, Delphi & SQL Development
- Vancouver, BC.
- (604) 689-2616
- -------------------------------------------------
-
-